\(\int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx\) [411]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 165 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {2 b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{35 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{7 d}+\frac {2 \sec ^5(c+d x) (a+b \sin (c+d x)) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{35 d}+\frac {12 a \left (2 a^2-b^2\right ) \tan (c+d x)}{35 d}+\frac {4 a \left (2 a^2-b^2\right ) \tan ^3(c+d x)}{35 d} \]

[Out]

2/35*b*(3*a^2-b^2)*sec(d*x+c)^3/d+1/7*sec(d*x+c)^7*(b+a*sin(d*x+c))*(a+b*sin(d*x+c))^2/d+2/35*sec(d*x+c)^5*(a+
b*sin(d*x+c))*(2*a*b+(3*a^2-b^2)*sin(d*x+c))/d+12/35*a*(2*a^2-b^2)*tan(d*x+c)/d+4/35*a*(2*a^2-b^2)*tan(d*x+c)^
3/d

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2770, 2940, 2748, 3852} \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {4 a \left (2 a^2-b^2\right ) \tan ^3(c+d x)}{35 d}+\frac {12 a \left (2 a^2-b^2\right ) \tan (c+d x)}{35 d}+\frac {2 b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{35 d}+\frac {2 \sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{35 d}+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d} \]

[In]

Int[Sec[c + d*x]^8*(a + b*Sin[c + d*x])^3,x]

[Out]

(2*b*(3*a^2 - b^2)*Sec[c + d*x]^3)/(35*d) + (Sec[c + d*x]^7*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x])^2)/(7*d)
 + (2*Sec[c + d*x]^5*(a + b*Sin[c + d*x])*(2*a*b + (3*a^2 - b^2)*Sin[c + d*x]))/(35*d) + (12*a*(2*a^2 - b^2)*T
an[c + d*x])/(35*d) + (4*a*(2*a^2 - b^2)*Tan[c + d*x]^3)/(35*d)

Rule 2748

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b)*((g*Co
s[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x
] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 2770

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-(g*C
os[e + f*x])^(p + 1))*(a + b*Sin[e + f*x])^(m - 1)*((b + a*Sin[e + f*x])/(f*g*(p + 1))), x] + Dist[1/(g^2*(p +
 1)), Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(p + 2) + a*b*(m + p + 1)*S
in[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && (Integers
Q[2*m, 2*p] || IntegerQ[m])

Rule 2940

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)]), x_Symbol] :> Simp[(-(g*Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x])^m*((d + c*Sin[e + f*x])/(f
*g*(p + 1))), x] + Dist[1/(g^2*(p + 1)), Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 1)*Simp[a*c*(p
 + 2) + b*d*m + b*c*(m + p + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[a^2 - b^2,
0] && GtQ[m, 0] && LtQ[p, -1] && IntegerQ[2*m] &&  !(EqQ[m, 1] && NeQ[c^2 - d^2, 0] && SimplerQ[c + d*x, a + b
*x])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{7 d}-\frac {1}{7} \int \sec ^6(c+d x) (a+b \sin (c+d x)) \left (-6 a^2+2 b^2-4 a b \sin (c+d x)\right ) \, dx \\ & = \frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{7 d}+\frac {2 \sec ^5(c+d x) (a+b \sin (c+d x)) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{35 d}+\frac {1}{35} \int \sec ^4(c+d x) \left (12 a \left (2 a^2-b^2\right )+6 b \left (3 a^2-b^2\right ) \sin (c+d x)\right ) \, dx \\ & = \frac {2 b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{35 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{7 d}+\frac {2 \sec ^5(c+d x) (a+b \sin (c+d x)) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{35 d}+\frac {1}{35} \left (12 a \left (2 a^2-b^2\right )\right ) \int \sec ^4(c+d x) \, dx \\ & = \frac {2 b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{35 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{7 d}+\frac {2 \sec ^5(c+d x) (a+b \sin (c+d x)) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{35 d}-\frac {\left (12 a \left (2 a^2-b^2\right )\right ) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{35 d} \\ & = \frac {2 b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{35 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{7 d}+\frac {2 \sec ^5(c+d x) (a+b \sin (c+d x)) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{35 d}+\frac {12 a \left (2 a^2-b^2\right ) \tan (c+d x)}{35 d}+\frac {4 a \left (2 a^2-b^2\right ) \tan ^3(c+d x)}{35 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.73 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.48 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {\sec ^7(c+d x) \left (15360 a^2 b+1536 b^3+35 b \left (-75 a^2+17 b^2\right ) \cos (c+d x)-3584 b^3 \cos (2 (c+d x))-1575 a^2 b \cos (3 (c+d x))+357 b^3 \cos (3 (c+d x))-525 a^2 b \cos (5 (c+d x))+119 b^3 \cos (5 (c+d x))-75 a^2 b \cos (7 (c+d x))+17 b^3 \cos (7 (c+d x))+8960 a^3 \sin (c+d x)+13440 a b^2 \sin (c+d x)+5376 a^3 \sin (3 (c+d x))-2688 a b^2 \sin (3 (c+d x))+1792 a^3 \sin (5 (c+d x))-896 a b^2 \sin (5 (c+d x))+256 a^3 \sin (7 (c+d x))-128 a b^2 \sin (7 (c+d x))\right )}{35840 d} \]

[In]

Integrate[Sec[c + d*x]^8*(a + b*Sin[c + d*x])^3,x]

[Out]

(Sec[c + d*x]^7*(15360*a^2*b + 1536*b^3 + 35*b*(-75*a^2 + 17*b^2)*Cos[c + d*x] - 3584*b^3*Cos[2*(c + d*x)] - 1
575*a^2*b*Cos[3*(c + d*x)] + 357*b^3*Cos[3*(c + d*x)] - 525*a^2*b*Cos[5*(c + d*x)] + 119*b^3*Cos[5*(c + d*x)]
- 75*a^2*b*Cos[7*(c + d*x)] + 17*b^3*Cos[7*(c + d*x)] + 8960*a^3*Sin[c + d*x] + 13440*a*b^2*Sin[c + d*x] + 537
6*a^3*Sin[3*(c + d*x)] - 2688*a*b^2*Sin[3*(c + d*x)] + 1792*a^3*Sin[5*(c + d*x)] - 896*a*b^2*Sin[5*(c + d*x)]
+ 256*a^3*Sin[7*(c + d*x)] - 128*a*b^2*Sin[7*(c + d*x)]))/(35840*d)

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 1.97 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.21

method result size
risch \(-\frac {16 \left (70 i a \,b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+14 b^{3} {\mathrm e}^{9 i \left (d x +c \right )}-70 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-35 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-120 a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}-12 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-42 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+21 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+14 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-14 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+7 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-2 i a^{3}+i a \,b^{2}\right )}{35 d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{7}}\) \(199\)
derivativedivides \(\frac {-a^{3} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {3 a^{2} b}{7 \cos \left (d x +c \right )^{7}}+3 a \,b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )}{d}\) \(219\)
default \(\frac {-a^{3} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {3 a^{2} b}{7 \cos \left (d x +c \right )^{7}}+3 a \,b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )}{d}\) \(219\)
parallelrisch \(-\frac {2 \left (35 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+105 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b -70 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+140 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+70 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+301 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+112 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+525 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b +70 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}-212 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+456 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+140 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+301 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+112 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+315 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b +28 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}-70 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+140 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+14 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+35 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+15 a^{2} b -2 b^{3}\right )}{35 d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{7}}\) \(359\)

[In]

int(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

-16/35*(70*I*a*b^2*exp(8*I*(d*x+c))+14*b^3*exp(9*I*(d*x+c))-70*I*a^3*exp(6*I*(d*x+c))-35*I*a*b^2*exp(6*I*(d*x+
c))-120*a^2*b*exp(7*I*(d*x+c))-12*b^3*exp(7*I*(d*x+c))-42*I*a^3*exp(4*I*(d*x+c))+21*I*a*b^2*exp(4*I*(d*x+c))+1
4*b^3*exp(5*I*(d*x+c))-14*I*a^3*exp(2*I*(d*x+c))+7*I*a*b^2*exp(2*I*(d*x+c))-2*I*a^3+I*a*b^2)/d/(1+exp(2*I*(d*x
+c)))^7

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.75 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {7 \, b^{3} \cos \left (d x + c\right )^{2} - 15 \, a^{2} b - 5 \, b^{3} - {\left (8 \, {\left (2 \, a^{3} - a b^{2}\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (2 \, a^{3} - a b^{2}\right )} \cos \left (d x + c\right )^{4} + 5 \, a^{3} + 15 \, a b^{2} + 3 \, {\left (2 \, a^{3} - a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{35 \, d \cos \left (d x + c\right )^{7}} \]

[In]

integrate(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/35*(7*b^3*cos(d*x + c)^2 - 15*a^2*b - 5*b^3 - (8*(2*a^3 - a*b^2)*cos(d*x + c)^6 + 4*(2*a^3 - a*b^2)*cos(d*x
 + c)^4 + 5*a^3 + 15*a*b^2 + 3*(2*a^3 - a*b^2)*cos(d*x + c)^2)*sin(d*x + c))/(d*cos(d*x + c)^7)

Sympy [F(-1)]

Timed out. \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**8*(a+b*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.75 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {{\left (5 \, \tan \left (d x + c\right )^{7} + 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 35 \, \tan \left (d x + c\right )\right )} a^{3} + {\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} a b^{2} - \frac {{\left (7 \, \cos \left (d x + c\right )^{2} - 5\right )} b^{3}}{\cos \left (d x + c\right )^{7}} + \frac {15 \, a^{2} b}{\cos \left (d x + c\right )^{7}}}{35 \, d} \]

[In]

integrate(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/35*((5*tan(d*x + c)^7 + 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 35*tan(d*x + c))*a^3 + (15*tan(d*x + c)^7 +
42*tan(d*x + c)^5 + 35*tan(d*x + c)^3)*a*b^2 - (7*cos(d*x + c)^2 - 5)*b^3/cos(d*x + c)^7 + 15*a^2*b/cos(d*x +
c)^7)/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 358 vs. \(2 (155) = 310\).

Time = 0.35 (sec) , antiderivative size = 358, normalized size of antiderivative = 2.17 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {2 \, {\left (35 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} + 105 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 70 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 140 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 70 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} + 301 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 112 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 525 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 70 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 212 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 456 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 140 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 301 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 112 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 315 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 28 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 70 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 140 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 14 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 35 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, a^{2} b - 2 \, b^{3}\right )}}{35 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7} d} \]

[In]

integrate(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-2/35*(35*a^3*tan(1/2*d*x + 1/2*c)^13 + 105*a^2*b*tan(1/2*d*x + 1/2*c)^12 - 70*a^3*tan(1/2*d*x + 1/2*c)^11 + 1
40*a*b^2*tan(1/2*d*x + 1/2*c)^11 + 70*b^3*tan(1/2*d*x + 1/2*c)^10 + 301*a^3*tan(1/2*d*x + 1/2*c)^9 + 112*a*b^2
*tan(1/2*d*x + 1/2*c)^9 + 525*a^2*b*tan(1/2*d*x + 1/2*c)^8 + 70*b^3*tan(1/2*d*x + 1/2*c)^8 - 212*a^3*tan(1/2*d
*x + 1/2*c)^7 + 456*a*b^2*tan(1/2*d*x + 1/2*c)^7 + 140*b^3*tan(1/2*d*x + 1/2*c)^6 + 301*a^3*tan(1/2*d*x + 1/2*
c)^5 + 112*a*b^2*tan(1/2*d*x + 1/2*c)^5 + 315*a^2*b*tan(1/2*d*x + 1/2*c)^4 + 28*b^3*tan(1/2*d*x + 1/2*c)^4 - 7
0*a^3*tan(1/2*d*x + 1/2*c)^3 + 140*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 14*b^3*tan(1/2*d*x + 1/2*c)^2 + 35*a^3*tan(1
/2*d*x + 1/2*c) + 15*a^2*b - 2*b^3)/((tan(1/2*d*x + 1/2*c)^2 - 1)^7*d)

Mupad [B] (verification not implemented)

Time = 5.02 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.92 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {{\cos \left (c+d\,x\right )}^4\,\left (\frac {8\,a^3\,\sin \left (c+d\,x\right )}{35}-\frac {4\,a\,b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^6\,\left (\frac {16\,a^3\,\sin \left (c+d\,x\right )}{35}-\frac {8\,a\,b^2\,\sin \left (c+d\,x\right )}{35}\right )-{\cos \left (c+d\,x\right )}^2\,\left (-\frac {6\,\sin \left (c+d\,x\right )\,a^3}{35}+\frac {3\,\sin \left (c+d\,x\right )\,a\,b^2}{35}+\frac {b^3}{5}\right )+\frac {3\,a^2\,b}{7}+\frac {a^3\,\sin \left (c+d\,x\right )}{7}+\frac {b^3}{7}+\frac {3\,a\,b^2\,\sin \left (c+d\,x\right )}{7}}{d\,{\cos \left (c+d\,x\right )}^7} \]

[In]

int((a + b*sin(c + d*x))^3/cos(c + d*x)^8,x)

[Out]

(cos(c + d*x)^4*((8*a^3*sin(c + d*x))/35 - (4*a*b^2*sin(c + d*x))/35) + cos(c + d*x)^6*((16*a^3*sin(c + d*x))/
35 - (8*a*b^2*sin(c + d*x))/35) - cos(c + d*x)^2*(b^3/5 - (6*a^3*sin(c + d*x))/35 + (3*a*b^2*sin(c + d*x))/35)
 + (3*a^2*b)/7 + (a^3*sin(c + d*x))/7 + b^3/7 + (3*a*b^2*sin(c + d*x))/7)/(d*cos(c + d*x)^7)